package com.example.util;

import com.example.Application;
import com.example.http.HttpClient;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ConfigFileUtil {

    public static Properties loadConfig() {
        InputStream resourceAsStream = Application.class.getClassLoader().getResourceAsStream("config.properties");
        Properties pro = new Properties();
        try {
            pro.load(resourceAsStream);
        } catch (IOException e) {
            e.printStackTrace();
            System.err.println("配置文件加载错误！");
        }
        return pro;
    }
}
